<template>
  <el-dialog
    :visible.sync="visible"
    :close-on-click-modal="false"
    :before-close="beforeClose"
    append-to-body
    top="30px"
    width="1000px"
  >
    <el-tabs>
      <el-tab-pane label="立项详情">
        <approve-edit :query-id="relatedId" view-mode></approve-edit>
      </el-tab-pane>
      <el-tab-pane label="担保意向函">
        <letter-view :query-id="relatedId"></letter-view>
      </el-tab-pane>
      <el-tab-pane label="合同信息">
        <contract-guard-view :query-id="relatedId"></contract-guard-view>
      </el-tab-pane>
      <el-tab-pane label="放款通知书">
        <loan-notice :query-id="relatedId"></loan-notice>
      </el-tab-pane>
      <el-tab-pane label="附件">
        <attach-view :query-id="relatedId" :visible="reportVisible"></attach-view>
      </el-tab-pane>
    </el-tabs>
  </el-dialog>
</template>

<script>
import { mapGetters } from 'vuex'
import AttachView from '@/credit/components/AttachView'
import LoanNotice from '@/credit/views/county/unionProvince/components/LoanNotice'
import ContractGuardView from '@/credit/views/county/unionProvince/components/ContractGuardView'
import ApproveEdit from '@/credit/views/county/unionProvince/components/ApproveEdit'
import LetterView from '@/credit/views/county/unionProvince/components/LetterView'
export default {
  components: {
    AttachView,
    LoanNotice,
    ContractGuardView,
    ApproveEdit,
    LetterView,
  },
  props: {
    visible: Boolean,
    relatedId: String,
    tabName: String,
  },
  computed: {
    ...mapGetters(['clientId']),
  },
  watch: {},
  data() {
    return {}
  },
  methods: {
    beforeClose() {
      this.$emit('close', false)
      this.$emit('update:visible', false)
    },
  },
}
</script>

<style></style>
